diff options
| author | Adam Soltys <[email protected]> | 2024-08-20 16:13:18 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-08-20 16:13:18 -0700 |
| commit | b7d9213ffec4aeb09508ca71f02880dca1c56a23 (patch) | |
| tree | c438cb108b32ce2100ff6659791cf283c9b0eeea /src/routes/(app)/ecash/[id]/+page.server.js | |
| parent | b549489aa400e623cf93b44f19aacbd62bbc1830 (diff) | |
| download | coinos-ui-b7d9213ffec4aeb09508ca71f02880dca1c56a23.tar.gz coinos-ui-b7d9213ffec4aeb09508ca71f02880dca1c56a23.zip | |
show spent ecash
Diffstat (limited to 'src/routes/(app)/ecash/[id]/+page.server.js')
| -rw-r--r-- | src/routes/(app)/ecash/[id]/+page.server.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/routes/(app)/ecash/[id]/+page.server.js b/src/routes/(app)/ecash/[id]/+page.server.js index c5f24e82..421c8cb6 100644 --- a/src/routes/(app)/ecash/[id]/+page.server.js +++ b/src/routes/(app)/ecash/[id]/+page.server.js @@ -4,6 +4,8 @@ import parse from "$lib/parse"; export async function load({ cookies, params, request, url }) { let { id } = params; - let token = await get(`/cash/${id}`); - return { id, token }; + let { token, status } = await get(`/cash/${id}`); + let spent = parseInt(status.spent); + let total = parseInt(status.total); + return { id, token, spent, total }; } |
